package com.cloudlead.plugin.security.action;

import com.cloudlead.common.worker.annotation.*;
import com.cloudlead.plugin.security.BusinessModules;
import com.cloudlead.common.lang.persistence.*;
import com.cloudlead.plugin.security.vo.ScRoleHasPrivilege;
import java.util.List;
import com.cloudlead.common.worker.action.impl.AbstractCrudActionFactory;
import com.cloudlead.plugin.security.service.ScRoleHasPrivilegeService;
import com.cloudlead.plugin.security.action.validator.ScRoleHasPrivilegeValidatorGroup.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.cloudlead.common.lang.annotation.Label;
import org.springframework.stereotype.Controller;
import javax.validation.constraints.NotNull;

/**
 * ScRoleHasPrivilegeActionFactory is a Codegen action factory type
 */
@Label("角色对应的权限管理")
@Controller("scRoleHasPrivilegeActionFactory")
public class ScRoleHasPrivilegeActionFactory extends AbstractCrudActionFactory<ScRoleHasPrivilegeService, ScRoleHasPrivilege> {

    @Autowired
    public ScRoleHasPrivilegeActionFactory(ScRoleHasPrivilegeService ScRoleHasPrivilegeService) {
        super(BusinessModules.ScRoleHasPrivilege, ScRoleHasPrivilegeService);
    }

    @Action
    @Order(1)
    @ValidatorGroup(Create.class)
    @Label("创建")
    @Override
    public ScRoleHasPrivilege create(@NotNull ScRoleHasPrivilege vo){
    	return super.create(vo);
    }
    
    @Action
    @Order(2)
    @ValidatorGroup(Update.class)
    @Label("更新")
    @Override
    public ScRoleHasPrivilege update(@NotNull ScRoleHasPrivilege vo){
    	return super.update(vo);
    }
    
    @Action
    @Order(3)
    @Label("批量更新")
    @Override
    public void updateAll(@NotNull ScRoleHasPrivilege vo, @NotNull Filter filter){
    	super.updateAll(vo, filter);
    }
    
    @Action
    @Order(4)
    @Label("根据实例批量更新")
    @Override
    public void updateAllByExample(@NotNull ScRoleHasPrivilege vo, @NotNull @Label("实例") ScRoleHasPrivilege example){
    	super.updateAllByExample(vo, example);
    }
    
    @Action
    @Order(5)
    @Label("查看")
    @Override
    public ScRoleHasPrivilege view(@NotNull @Label("编号") String id){
    	return super.view(id);
    }
    
    @Action
    @Order(6)
    @Label("单值查询")
    @Override
    public ScRoleHasPrivilege findOne(@NotNull Filter filter){
    	return super.findOne(filter);
    }
    
    @Action
    @Order(7)
    @Label("根据实例单值查询")
    @Override
    public ScRoleHasPrivilege findOneByExample(@NotNull @Label("实例") ScRoleHasPrivilege example){
    	return super.findOneByExample(example);
    }
    
    @Action
    @Order(8)
    @Label("统计")
    @Override
    public long count(Filter filter){
    	return super.count(filter);
    }
    
    @Action
    @Order(9)
    @Label("根据实例统计")
    @Override
    public long countByExample(@NotNull @Label("实例") ScRoleHasPrivilege example){
    	return super.countByExample(example);
    }
    
    @Action
    @Order(10)
    @Label("列表查询")
    @Override
    public List<ScRoleHasPrivilege> list(Filter filter, Sort sort){
    	return super.list(filter, sort);
    }
    
    @Action
    @Order(11)
    @Label("根据实例列表查询")
    @Override
    public List<ScRoleHasPrivilege> listByExample(@NotNull @Label("实例") ScRoleHasPrivilege example){
    	return super.listByExample(example);
    }
    
    @Action
    @Order(12)
    @Label("分页查询")
    @Override
    public Page<ScRoleHasPrivilege> findAll(@NotNull PageRequest pageable){
    	return super.findAll(pageable);
    }
    
    @Action
    @Order(13)
    @Label("删除")
    @Override
    public ScRoleHasPrivilege delete(@NotNull @Label("编号") String id){
    	return super.delete(id);
    }
    
    @Action
    @Order(14)
    @Label("批量删除")
    @Override
    public void deleteAll(Filter filter){
    	super.deleteAll(filter);
    }
    
    @Action
    @Order(15)
    @Label("根据实例批量删除")
    @Override
    public void deleteAllByExample(@Label("实例") ScRoleHasPrivilege example){
    	super.deleteAllByExample(example);
    }
    
}

